package com.tudouji.project.farmer.service.impl;

import java.util.ArrayList;
import java.util.List;

import com.tudouji.project.permission.domain.Salespermission;
import com.tudouji.project.permission.service.ISalespermissionService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.tudouji.project.farmer.mapper.FarmerbatchMapper;
import com.tudouji.project.farmer.domain.Farmerbatch;
import com.tudouji.project.farmer.service.IFarmerbatchService;

/**
 * 种植批次Service业务层处理
 * 
 * @author tudouji
 * @date 2021-04-22
 */
@Service
public class FarmerbatchServiceImpl implements IFarmerbatchService 
{
    @Autowired
    private FarmerbatchMapper farmerbatchMapper;
    @Autowired
    private ISalespermissionService permissionService;
    /**
     * 查询种植批次
     * 
     * @param guid 种植批次ID
     * @return 种植批次
     */
    @Override
    public Farmerbatch selectFarmerbatchById(String guid)
    {
        return farmerbatchMapper.selectFarmerbatchById(guid);
    }

    /**
     * 查询种植批次列表
     * 
     * @param farmerbatch 种植批次
     * @return 种植批次
     */
    @Override
    public List<Farmerbatch> selectFarmerbatchList(Farmerbatch farmerbatch, String tuserId) throws Exception
    {
        return farmerbatchMapper.selectFarmerbatchList(farmerbatch);
    }

    /**
     * 新增种植批次
     * 
     * @param farmerbatch 种植批次
     * @return 结果
     */
    @Override
    public int insertFarmerbatch(Farmerbatch farmerbatch)
    {
        return farmerbatchMapper.insertFarmerbatch(farmerbatch);
    }

    /**
     * 修改种植批次
     * 
     * @param farmerbatch 种植批次
     * @return 结果
     */
    @Override
    public int updateFarmerbatch(Farmerbatch farmerbatch)
    {
        return farmerbatchMapper.updateFarmerbatch(farmerbatch);
    }

    /**
     * 批量删除种植批次
     * 
     * @param guids 需要删除的种植批次ID
     * @return 结果
     */
    @Override
    public int deleteFarmerbatchByIds(String[] guids)
    {
        return farmerbatchMapper.deleteFarmerbatchByIds(guids);
    }

    /**
     * 删除种植批次信息
     * 
     * @param guid 种植批次ID
     * @return 结果
     */
    @Override
    public int deleteFarmerbatchById(String guid)
    {
        return farmerbatchMapper.deleteFarmerbatchById(guid);
    }
}
